package com.ficus.road.maintain.controller;

import com.ficus.road.maintain.service.TheoryGpsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiawen yang
 * @date 2022/4/8 下午8:05
 */
@RestController
public class TheoryGpsController {
    @Autowired
    private TheoryGpsService theoryGpsService;

    @PostMapping("/gps/create")
    public ResponseEntity<String> createShouldCoverGps() {
        theoryGpsService.createTheoryGps(80);
        return new ResponseEntity<>("success", HttpStatus.OK);
    }

    @GetMapping("/gps/distinct")
    public ResponseEntity<String> testDistinct() {
        theoryGpsService.test();
        return new ResponseEntity<>("success", HttpStatus.OK);
    }

    /**
     * 生成测试用的gps集合
     *
     * @return
     */
//    @PostMapping("/gps/testGps/create")
//    public ResponseEntity<String> createTestGps(@RequestBody GpsTestFilter filter) {
//        theoryGpsService.createTestGps(filter);
//        return new ResponseEntity<>("success", HttpStatus.OK);
//    }
}
